home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 3
/
United Public Domain Gold 3.iso
/
games
/
pg326.dms
/
pg326.adf
/
darts2.Bak
/
darts2.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1989-05-09
|
18KB
|
675 lines
' **********************************
' *** PROGRAM BY PAUL WHITEHEAD ***
' ************ DARTS ***************
' **********************************
Cls 0
Double Buffer
Dim TL(2) : Dim SET(2) : Dim LEG(2) : Dim D(60) : Dim TU(8)
Dim N$(10) : Dim AV3(4) : Dim HE(2) : Dim DA(12)
Global X,Y,BB,SC,TL(),PL,SK,PR,N$(),OP,MIS,TURN,LEG(),SET(),BMUL,WIN,SCB,MISS
Global SET,LEG,TDS,HIT,MIS,LHIT,D(),NT,AIM,TM,CD#,COMP,CR,CX,CY,FIN,B1,B2,B3
Global FT,CSS,FTL,CSL,NSB,HP,AV3(),HE(),DA(),IS,TU(),TU,RD,GM,CG,IG,DB,P1
PL=1 : SK=1 : PR=0 : OP=2 : SET=3 : LEG=3 : DB=0
Goto SETUP
Stop
Procedure SETUP
N$(1)="Player 1" : N$(2)="Player 2"
N$(3)="Phil" : N$(4)="John" : N$(5)="Eric"
N$(6)="Mark" : N$(7)="Jocky" : N$(8)="Richard"
N$(9)="Peter" : N$(10)="Paul"
Hide On
Close Editor
Flash Off
Get Rom Fonts
Screen Open 1,320,256,64,Lowres : Cls 0
Screen Open 3,512,256,16,Lowres : Cls 0
Screen Open 2,512,256,16,Lowres : Cls 0
Screen To Front 0 : Cls 0 : Screen 0
End Proc
SETUP:
S3=0
SETUP
DART
TITLE
Pack 0 To 3
'Shift Up 15,5,15,1
Goto QU
NEW:
While Mouse Key<>1
Wend
Gosub EHELP
While Mouse Key<>1
Wend
If TU=1 Then Goto TU
QU:
TU=0
RD=0 : GM=0
Show On
IS=0
MENU
If IS=1 Then Gosub EHELP : IS=0 : Goto QU
If TU=0 Then Goto CONT
'
TU:
Do
Shoot
TURN
SR=1 : Gosub EHELP : SR=0
If WIN>0 Then While Mouse Key<>0 : Wend : While Mouse Key<>1 : Wend : TU=0 : Screen 2 : Goto QU
Wait 2
If CG=0 Then BOARD : Screen To Back 3 : Screen Hide 3 : Screen To Front 1 : Screen Show 1 : RESTART : Goto GAME
Loop
'
CONT:
BOARD
RESTART
Goto GAME
Procedure BOARD
If DB=1 Then Pop Proc
Load Iff "DART:Screens/BOARD1",1
DB=1
End Proc
Procedure INFO
Load Iff "DART:Screens/info",3
End Proc
Procedure TITLE
Load Iff "dart:screens/title",2
End Proc
Procedure DART
Load "dart:sprites/ds1.abk"
End Proc
Procedure AIM
Sprite 2,X Mouse,Y Mouse,2
Bob 1,X Screen(X Mouse)+32,Y Screen(Y Mouse)+32,10 : Update
Rem Main loop
Do
Rem Move sprite along with mouse
Sprite 1,X Mouse,Y Mouse,1
Rem Move bob
Bob 1,X Screen(X Mouse)+32,Y Screen(Y Mouse)+32,10
Locate 0,1 : Print " "
Locate 0,1 : Print X Mouse;" ";Y Mouse
If Mouse Key=1 Then Update
If Mouse Key=2 Then Stop
Wait Vbl
Loop
End Proc
'
POSITION:
COMP=0
If PL=1 and TURN=2 Then COMP=1
If COMP=1 or HP=1 Then COMPO
If COMP=1 Then Goto NHP
If HP=1 Then Paper 47 : Locate 0,29 : Centre " "
If HP=1 and TM=1 Then Print At(18,29);AIM
If HP=1 and TM=3 Then Print At(14,29);"Treble ";AIM
If HP=1 and TM=2 Then Print At(14,29);"Double ";AIM
NHP:
POSITION
Return
'
'
GAME:
If FON=1 Then Goto NSWAP
GAME
NSWAP:
FON=0
Do
CSL=0
BB=0 : SC=0 : TL=0
Wait 10
While Mouse Key<>1
If Key State(69)=True Then Goto QU
If Mouse Key=2 Then K=0 : Gosub HELP
If Key State(95)=True Then K=1 : Gosub HELP
Wend
If TL(1)<2 or TL(2)<2 Then Goto FINO
SCB=TL(TURN)
RESULTS
Goto CONTROL
Loop
'
FINO:
If TL(TURN)<0 Then TL(TURN)=SCB : Goto GAME
If TL(TURN)=1 Then TL(TURN)=SCB : Goto GAME
If TL(TURN)=0 and(HIT<>5 and HIT<>1) Then TL(TURN)=SCB : Goto GAME
WIN=NT
If(HIT=5 or HIT=1) and TL(TURN)=0 Then WIN=TURN
LEG(WIN)=LEG(WIN)+1
CSS=0
If LEG/2<LEG(WIN) Then LEG(1)=0 : LEG(2)=0 : SET(WIN)=SET(WIN)+1 : CSS=1
SC=0 : RESULTS
If SET/2<SET(WIN) Then FIN=1 : RESULTS : Goto NEW
For T=1 To 2
TL(T)=501 : Next T :
CSL=1
Goto GAME
'
HELP:
If K=1 Then Wait Key
EHELP:
If S3=0 Then INFO
Screen To Back 1
Screen To Front 3
Screen Hide 1 : Screen Show 3 : Screen 3
Pen 0 : Paper 2
'
If SR=0 Then Goto NR
'
Bar 110,48 To 515,130
G=0
Repeat
Inc G
If TU(G*2)<11 and TU((G*2)-1)>10 Then Locate 15,7+G : Centre N$(TU(G*2))+" beat "+N$(TU(G*2-1)-100)
If TU(G*2)>10 and TU((G*2)-1)<11 Then Locate 15,7+G : Centre N$(TU((G*2)-1))+" beat "+N$(TU(G*2)-100)
Until G=4
If TU(1)<11 and TU(2)<11 Then Locate 15,8 : Centre N$(TU(1))+" v "+N$(TU(2))
If TU(3)<11 and TU(4)<11 Then Locate 15,9 : Centre N$(TU(3))+" v "+N$(TU(4))
If TU(5)<11 and TU(6)<11 Then Locate 15,10 : Centre N$(TU(5))+" v "+N$(TU(6))
If TU(7)<11 and TU(8)<11 Then Locate 15,11 : Centre N$(TU(7))+" v "+N$(TU(8))
Locate 0,0 : For N=1 To 8 : Print TU(N) : Next N
If WIN>0 Then Locate 15,14 : Centre "The Winner is "+N$(TU(WIN)) : TU=0
Goto ENF
NR:
Under On : Print At(15,6);" Instructions for 501 " : Under Off
Print At(15,8);"The aim of this Game is to decend from 501 to 0."
Print At(15,9);"In order to win the game you must finish with a"
Print At(15,10);"Double or a Bulls eye. If you Fail to finish with "
Print At(15,11);"a Double or a bulls eye the you could go bust and"
Print At(15,12);"fail to win then game."
If IS=1 Then Print At(15,13);"In the game the left mouse button fires the dart."
If IS=1 Then Print At(15,14);"The right mouse button calls up information. "
Paper 3
If TU=0 Then P1=1
Under On : Print At(6,21);N$(P1);At(43,21);N$(OP+1) : Under Off
AV1=0 : AV2=0 : A1=0 : A2=0 : A3=0 : A4=0 : A5=0 : A6=0
If DA(1)>0 Then A1=DA(4)/DA(1) : If DA(2)>0 Then A2=DA(5)/DA(2) : If DA(3)>0 Then A3=DA(6)/DA(3)
If DA(7)>0 Then A4=DA(10)/DA(7)
If DA(8)>0 Then A5=DA(11)/DA(8)
If DA(9)>0 Then A6=DA(12)/DA(9)
If AV3(3)>0 Then AV1=AV3(1)/AV3(3)
If AV3(4)>0 Then AV2=AV3(2)/AV3(4)
Print At(6,23);"3 Dart Av :-";AV1;" ";At(43,23);"3 Dart Av :-";AV2;" "
Print At(6,24);"1st Dart Av :-";A1;" ";At(43,24);"1st Dart Av :-";A4;" "
Print At(6,25);"2nd Dart Av :-";A2;" ";At(43,25);"2nd Dart Av :-";A5;" "
Print At(6,26);"3rd Dart Av :-";A3;" ";At(43,26);"3rd Dart Av :-";A6;" "
Print At(6,27);"180's :-";HE(1);" ";At(43,27);"180's :-";HE(2);" "
ENF:
While Mouse Key<>0 : Wend
While Mouse Key<>1 : Wend
S3=1
If SR=1 Then Return
Screen To Back 3
Screen To Front 1
Screen Hide 3
Screen 1 : Screen Show 1
Return
'
CONTROL:
TDS=0 : BB=0
Do
BB=BB+1
If TDS=180 Then Inc HE(TURN)
If BB<4 Then Goto NOFIN
Inc AV3(2+TURN) : AV3(TURN)=AV3(TURN)+TDS
Goto GAME
'
NOFIN:
If BB=1 Then Bob Off D(1) : Bob Off D(2) : Bob Off D(3)
SC=0 : BMUL=0
Gosub POSITION
SCORE
TDS=TDS+SC
D(BB)=BB
If MISS=1 Then D(BB)=0
RESULTS
FON=0
If TL(1)<2 or TL(2)<2 and BB<3 Then Goto FINO2
Loop
FINO2:
FON=1
For N=BB+1 To 3
Bob N,300,300,2 : Next N
BB=4 :
Goto GAME
'
'
Procedure MENU
Screen To Back 1
Screen To Front 2
Screen Show 2
Screen 2
Show On
Paper 0
Locate 0,31 : Centre "Select Option from Menu"
Ink 1 : Pen 4
OPTIONS:
Menu$(1)=" Options "
Menu$(1,1)="One Player"
If PL=1 Then Menu$(1,1)="One Player <-"
Menu$(1,2)="Two Player"
If PL=2 Then Menu$(1,2)="Two Player <-"
Menu$(2)="Level "
Menu$(2,1)="Amateur"
If SK=1 Then Menu$(2,1)="Amateur <-"
Menu$(2,2)="Professional"
If SK=2 Then Menu$(2,2)="Professional <-"
Menu$(3)="Game "
Menu$(3,1)="Start"
Menu$(3,2)="Practice"
Menu$(3,3)="Tournament"
Menu$(5)="Opponent "
For N=1 To 9
Menu$(5,N)=N$(N+1) : If N=OP Then Menu$(5,N)=N$(N+1)+" <-"
Next N
Menu$(4)="Setup "
Menu$(4,1)="Legs"
Menu$(4,2)="Sets"
Menu$(4,1,1)="3 Legs"
If LEG=3 Then Menu$(4,1,1)="3 Legs <-"
Menu$(4,1,2)="5 Legs"
If LEG=5 Then Menu$(4,1,2)="5 Legs <-"
Menu$(4,1,3)="7 Legs"
If LEG=7 Then Menu$(4,1,3)="7 Legs <-"
Menu$(4,2,1)="1 Sets"
If SET=1 Then Menu$(4,2,1)="1 Sets <-"
Menu$(4,2,2)="3 Sets"
If SET=3 Then Menu$(4,2,2)="3 Sets <-"
Menu$(4,2,3)="5 Sets"
If SET=5 Then Menu$(4,2,3)="5 Sets <-"
Menu$(4,2,4)="7 Sets"
If SET=7 Then Menu$(4,2,4)="7 Sets <-"
Menu$(4,2,5)="9 Sets"
If SET=9 Then Menu$(4,2,5)="9 Sets <-"
Menu$(4,2,6)="11 Sets"
If SET=11 Then Menu$(4,2,6)="11 Sets<-"
'
Menu$(1,3)="Help On"
Menu$(1,4)="Instructions"
If HP=0 Then Menu$(1,3)="Help off"
On Menu Goto SELECT,SELECT,GAM,SETU,OPER
On Menu On
Menu On
Wait Key
Goto OPTIONS
SELECT:
If Choice(2)=3 and HP=1 Then HP=0 : Goto GIT
If Choice(2)=3 and HP=0 Then HP=1 : Goto GIT
If Choice(2)=4 Then IS=1 : Pop Proc
If Choice(1)=1 Then PL=Choice(2) : If PL=2 Then OP=1
If Choice(1)=1 Then If PL=1 Then OP=2
If Choice(1)=2 Then SK=Choice(2)
GIT:
On Menu On
Goto OPTIONS
GAM:
TU=0 : PR=0
If Choice(2)=1 Then Pop Proc
If Choice(2)=2 Then PR=1 : Pop Proc
If Choice(2)=3 Then TU=1 : Pop Proc
On Menu On
Goto OPTIONS
OPER:
OP=Choice(2) : If OP=1 Then PL=2
If OP>1 Then PL=1
On Menu On
Goto OPTIONS
SETU:
If Choice(2)=1 Then LEG=2+((Choice(3)*2)-1)
If Choice(2)=2 Then SET=(Choice(3)*2)-1
On Menu On
Goto OPTIONS
End Proc
Procedure POSITION
9 Rem----------------------width
XW=6+SK : CX=CX : YW=8 : A=1
Ink 11 : Draw 7,7 To 193,7 : Draw 7,8 To 193,8
While Mouse Key<>0
Wend
Repeat
If A=1 Then Ink 0 : Plot XW,YW : Plot XW,YW-1
If A=1 and SK=2 Then Plot XW-1,YW : Plot XW-1,YW-1
If A=0 Then Ink 11 : Plot XW,YW : Plot XW,YW-1
If A=0 and SK=2 Then Plot XW+1,YW : Plot XW+1,YW-1
If A=1 Then XW=XW+SK : If XW>192 Then A=0 : If COMP=1 Then CX=CX+1
If A=0 Then XW=XW-SK : If XW<10 Then A=1
Until(Mouse Key=1 and COMP=0) or(CX=XW and COMP=1)
Rem --------------------hight
While Mouse Key<>0
Wend
Ink 11 : Draw 201,14 To 201,201 : Draw 200,14 To 200,201
XH=200 : YH=14+SK : CY=CY : A=1
Repeat
If A=1 Then Ink 0 : Plot XH,YH : Plot XH+1,YH
If A=1 and SK=2 Then Plot XH,YH-1 : Plot XH+1,YH-1
If A=0 Then Ink 11 : Plot XH,YH : Plot XH+1,YH
If A=0 and SK=2 Then Plot XH,YH+1 : Plot XH+1,YH+1
If A=1 Then YH=YH+SK : If YH>201-SK Then A=0 : If COMP=1 Then CY=CY+1
If A=0 Then YH=YH-SK : If YH<15+SK Then A=1
Until(Mouse Key=1 and COMP=0) or(CY=YH and COMP=1)
Rem ---------------------throw
'
MISS=0
C=Point(XW,YH) : R=Rnd(20) : R2=Rnd(80)
If C=33 and R=0 Then Goto MISS
If BB=2 and B1=1 Then If X Bob(1)=XW-16 and Y Bob(1)=YH-14 and R2<10 Then Goto MISS
If BB=3 and B1=1 Then If X Bob(1)=XW-16 and Y Bob(1)=YH-14 and R2<10 Then Goto MISS
If BB=3 and B2=1 Then If X Bob(2)=XW-16 and Y Bob(2)=YH-14 and R2<10 Then Goto MISS
'
' Show On
' While Mouse Key<>0 : Wend
' While Mouse Key<>1
' YH=Y Screen(Y Mouse)
' XW=X Screen(X Mouse)
' Wend
'
Goto HIT
MISS:
If BB=1 Then B1=0
If BB=2 Then B2=0
If BB=3 Then B3=0
MISS=1 : Shoot
RN=Rnd(1)+1
Bob BB,XW-16,YH-14,RN : Wait 20 : Bob Off BB
For N=(YH-5) To 250 : Hot Spot 3,16,16
Bob 4,XW+4,(YH-14)+N,3 : Next N : Bob Off 4 : Goto ENY
HIT:
RN=Rnd(1)+1
'Hot Spot BB,16,14
'Bob BB,XW,YH,RN
Bob BB,XW-16,YH-14,RN
If BB=1 Then B1=1
If BB=2 Then B2=1
If BB=3 Then B3=1
Shoot
ENY:
X=XW : Y=YH
End Proc
Procedure SCORE
A=X : B=Y
A=-100+A
B=107-B
X#=A : Y#=B
R=Sqr((A*A)+(B*B))
If X#=0 Then X#=1
If Y#=0 Then Y#=1
D#=Y#/X#
Degree
D#=Atan(D#)
If X#>0 and Y#>0 Then D#=D#
If X#<0 and Y#>0 Then D#=180+D#
If X#<0 and Y#<0 Then D#=180+D#
If X#>0 and Y#<0 Then D#=360+D#
' SCORE
If D#>351 or D#<=9 Then SC=6
If D#>9 and D#<=27 Then SC=13
If D#>27 and D#<=45 Then SC=4
If D#>45 and D#<=63 Then SC=18
If D#>63 and D#<=81 Then SC=1
If D#>81 and D#<=99 Then SC=20
If D#>99 and D#<=117 Then SC=5
If D#>117 and D#<=135 Then SC=12
If D#>135 and D#<=153 Then SC=9
If D#>153 and D#<=171 Then SC=14
If D#>171 and D#<=189 Then SC=11
If D#>189 and D#<=207 Then SC=8
If D#>207 and D#<=225 Then SC=16
If D#>225 and D#<=243 Then SC=7
If D#>243 and D#<=261 Then SC=19
If D#>261 and D#<=279 Then SC=3
If D#>279 and D#<=297 Then SC=17
If D#>297 and D#<=315 Then SC=2
If D#>315 and D#<=333 Then SC=15
If D#>333 and D#<=351 Then SC=10
BMUL=SC
HIT=3
If R<4 Then SC=50 : HIT=1
If R>=4 and R<=8 Then SC=25 : HIT=2
If R=>41 and R<48 Then SC=SC*3 : HIT=4
If R=>69 and R<76 Then SC=SC*2 : HIT=5
If R=>76 Then SC=0 : HIT=6
If MISS=1 Then SC=0 : HIT=6
If TURN=1 Then Inc DA(BB) : DA(3+BB)=DA(3+BB)+SC
If TURN=2 Then Inc DA(6+BB) : DA(9+BB)=DA(9+BB)+SC
End Proc
Procedure TURN
If GM>0 Then Goto SKIT
For N=1 To 8 : TU(N)=2+N : Next N
TU(1)=1 : If PL=2 Then TU(2)=2
N=0
Repeat
Inc N : A=Rnd(7)+1 : B=Rnd(7)+1
Swap TU(A),TU(B)
Until N=20
'For N=1 To 8 : Print TU(N) : Next N
'
SKIT:
WIN=0
If RD=3 and GM=1 Then For N=1 To 8 : If TU(N)<100 Then WIN=N
If RD=3 and GM=1 Then Next N : Pop Proc
If RD>0 and CG=0 Then If SET(1)<SET(2) Then TU((GM*2)-1)=TU((GM*2)-1)+100
If RD>0 and CG=0 Then If SET(1)>SET(2) Then TU(GM*2)=TU(GM*2)+100
XGAM:
Inc GM
If RD=1 and GM=5 Then GM=1
If RD=2 and GM=3 Then GM=1
If RD=3 and GM=2 Then Pop Proc
If GM=1 Then Inc RD
N=0
If GM>1 Then Goto SKI1
Repeat
Inc N
For A=1 To 7
If TU(A)>10 Then Swap TU(A),TU(A+1)
Next A
Until N=20
SKI1:
'
NTUN:
CG=0 : P1=TU((GM*2)-1) : P2=TU(GM*2) : If P1>2 and P2>2 Then CG=1
If CG=0 Then Goto NCO
Repeat
A=Rnd(P1) : B=Rnd(P2)
Until A<>B
If A<B Then TU((GM*2)-1)=TU((GM*2)-1)+100 : Pop Proc
If A>B Then TU(GM*2)=TU(GM*2)+100 : Pop Proc
NCO:
If P2=1 or(P2=2 and P1>1) Then Swap P1,P2 : Swap TU(GM*2),TU((GM*2)-1)
OP=P2-1
If OP<>2 Then PL=1
If P1=1 and P2=2 Then PL=2
End Proc
Procedure RESTART
FIN=0 : CSS=0 : CSL=0
Hide On
Screen To Back 3
Screen To Back 2
Screen To Front 1
Screen Hide 3 : Screen Hide 2
Screen Show 1 : Screen 1
'
For T=1 To 2
TL(T)=501 : SET(T)=0 : LEG(T)=0 : HE(T)=0 : Next T
For T=1 To 4 : AV3(T)=0 : Next T
For T=1 To 12 : DA(T)=0 : Next T
TURN=Rnd(1)+1
FT=TURN : FTL=TURN
If TURN=1 Then FT=2 : FTL=2 : Goto FRR
If TURN=2 Then FT=1 : FTL=1 : Goto FRR
FRR:
End Proc
Procedure GAME
If CSS=0 Then Goto TIT
CSL=0
If FT=1 Then FT=2 : FTL=2 : Goto IT
If FT=2 Then FT=1 : FTL=1 : Goto IT
TIT:
If CSL=0 Then Goto TITS
If FTL=1 Then FTL=2 : Goto TITS
If FTL=2 Then FTL=1 :
TITS:
If TL(1)<1 or TL(2)<1 Then Goto IT
If TURN=1 Then TURN=2 : Goto IT
If TURN=2 Then TURN=1 :
IT:
'Print At(1,1);"fts:";FT
'Print At(1,2);"ftl:";FTL
If CSS=1 Then TURN=FT : CSS=0
If CSL=1 Then TURN=FTL : CSL=0
If TURN=1 Then NT=2
If TURN=2 Then NT=1
If PR=1 Then TURN=1
End Proc
Procedure RESULTS
TL(TURN)=TL(TURN)-SC
Paper 0 : Pen 5
Print At(30,6);" "
Print At(30,10);" "
Paper 47 : Locate 0,29 : Centre " "
W=WIN
If COMP=1 Then W=OP+1
If TU=1 and W=1 Then W=P1
If FIN=1 Then Locate 0,29 : Centre "Winner is "+N$(W) : Pop Proc
If TU=0 Then P1=1
If TURN=1 Then Locate 0,29 : Centre N$(P1)+" < V "+N$(OP+1)
If TURN=2 Then Locate 0,29 : Centre N$(P1)+" V > "+N$(OP+1)
Pen 11
Paper 0
Print At(29,18);SET(1);At(32,18);SET(2)
Print At(29,23);LEG(1);At(32,23);LEG(2)
Print At(30,4);"Score";At(30,6);SC
Print At(30,8);"Total";At(30,10);TDS
A=0 : If TL(1)<100 Then A=1
If TL(1)<10 Then A=2
Paper 47 : Print At(2,29);" ";At(33,29);" "
Print At(2+A,29);TL(1);At(33,29);TL(2)
End Proc
Procedure COMPO
' If BB=1 Then Locate 1,1 : Input TL(TURN)
T=TL(TURN) : D=4-BB : OT=TL(NT) : GF=0
UF=Rnd(15) : R=Rnd(19)+1 : O=Rnd(12) : OO=Rnd(20) : AIM=0
PF=0 : If TL(NT)<101 Then PF=1
'
TM=3
For N=1 To 20
If N*2=T Then AIM=N : TM=2
Next N
If T=50 and OO<15 Then AIM=50 : TM=1
If T=99 Then AIM=19 : TM=3
If T=50 and PF=1 and D=1 Then AIM=50 : TM=1
If T=50 and OO>14 Then AIM=10 : TM=1
If AIM>0 Then Goto FIN
If TL(TURN)<140 Then Goto SKIPY
'
For N=1 To 50
If(N*10)=T Then R=1
Next N
If R<19 Then AIM=20 : Goto FIN
If R>18 Then AIM=19 : If R=20 and O<3 Then AIM=50 : TM=1 : Goto FIN
Goto FIN
'
SKIPY:
'
If T<101 Then Goto OHNO
A=20 : N=20 : M=20 : AA=Rnd(6+Rnd(2)) : TM=2
'
If UF>13 Then N=50 : TM=1
If T>170 Then GT=40
If T>170 and UF=14 Then GT=50
If T<171 Then GT=0
DI=51
TI=3 : AD=9
Do
Repeat
If N=49 Then N=20 : TM=2
If T-((M*3)+(N*TM)+(A*TI))=GT Then AIM=M : TM=3 : Goto FIN
A=A-1 : If A=0 Then A=20 : M=M-1 : If M=6 Then M=20 : N=N-1
Until N=AA
Inc AD
If AD=10 Then A=0 : Dec DI
N=20 : A=20 : M=20
If DI=49 Then DI=20
If DI<50 Then GT=DI*2
GT=GT+AD
If DI=AA Then Goto OHNO
Loop
'
'
OHNO:
N=20 : M=20 : AA=0 : TI=2 : TM=1 : H=Rnd(15)
'
F=0
If UF>10 and PF=1 and D=1 Then N=50
If UF>14 or T=110 Then N=50 : F=30
Do
If N=49 Then N=20 : TI=2
If N=50 Then TI=1
If T-((N*TI)+(M*TM))=0 Then AIM=M : Goto FIN
Dec M : If M=0 Then M=20 : Dec N
If H<14 and N=AA and TM=1 Then TM=4
If H<14 Then If N=AA and TM=2 Then Goto SKIPY1
If H<14 Then If N=AA Then N=20+F : Dec TM
If H>13 Then If N=AA and TM=3 Then Goto SKIPY1
If H>13 Then If N=AA Then N=20+F : Inc TM
Loop
'
SKIPY1:
FIN:
If AIM=50 Then TM=1
If T-(AIM*TM)>0 and AIM*TM<21 Then AIM=AIM*TM : TM=1
If AIM=0 Then AIM=Rnd(19)+1 : Boom
'Print At(0,1);" "
'Locate 0,1 : Input "Aim:";AIM
'Print At(0,2);" "
'Locate 0,2 : Input "Times:";TM
If AIM=6 Then CD#=351+9
If AIM=13 Then CD#=9+9
If AIM=4 Then CD#=27+9
If AIM=18 Then CD#=45+9
If AIM=1 Then CD#=63+9
If AIM=20 Then CD#=81+9
If AIM=5 Then CD#=99+9
If AIM=12 Then CD#=117+9
If AIM=9 Then CD#=135+9
If AIM=14 Then CD#=153+9
If AIM=11 Then CD#=171+9
If AIM=8 Then CD#=189+9
If AIM=16 Then CD#=207+9
If AIM=7 Then CD#=225+9
If AIM=19 Then CD#=243+9
If AIM=3 Then CD#=261+9
If AIM=17 Then CD#=279+9
If AIM=2 Then CD#=297+9
If AIM=15 Then CD#=315+9
If AIM=10 Then CD#=333+9
' Print At(0,BB);" "
'Print At(0,5);" "
' Print At(0,BB);"A=";AIM*TM
CR=Rnd(76)
SI=OP+BB :
RS=Rnd(15-SI)
RY=Rnd(15-SI)
R2=(15-RS)
'Print At(0,5);SI
If TM=3 Then CR=41+Rnd(7)
If TM=2 Then CR=70+Rnd(7)
P=Rnd(10)
'
'
If TM=1 and P<10 Then CR=59+((-12+R2)+(Rnd(24-R2-R2)))
If TM=1 and P>9 Then CR=25+((-16+R2)+(Rnd(32-R2-R2)))
' If TM=1 and P<10 Then CR=47+Rnd(24)
' If TM=1 and P>9 Then CR=9+Rnd(32)
If AIM=50 Then CR=Rnd(4)
If AIM=25 Then CR=Rnd(9)+4
Degree
CX=CR*(Cos(CD#))
CY=CR*(Sin(CD#))
CX=CX+100
CY=107-CY
RX=(RS)
RY=(RY)
AA=Rnd(1)
If AA=1 Then CX=CX+RX : CY=CY+RY
If AA=0 Then CX=CX-RX : CY=CY-RY
End Proc